<body id='popout-body' scroll="no"><section id='popout' class='body'>
	
	<section id='popout-selector'>
		<img src="assets/images/pt-player-main-header.png" width="310" height="39" alt="Pt Player Main Header">
		<div id='popout-social'>
		
						
									<?PHP

									if($conf->facebook)
									{
										?>
											     <!-- AddThis Button BEGIN -->
												<div class="addthis_toolbox addthis_default_style ">
												<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
												<a class="addthis_button_tweet"></a>

												</div>
												<script type="text/javascript">var addthis_config = {"data_track_clickback":true};</script>
												<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4dc99e7b35c96e4c"></script>
												<!-- AddThis Button END -->

										<?PHP
									}
									?>
									
						               
	
		</div>

		<div id='popout-communities'>
		
			
					<?PHP 
					foreach($header_dropdown as $z)
					{
						
										foreach($z['child'] as $y)
										{
											if($y['status']='enabled')
											{
												?>
												<li class='popout-category' name='co<?PHP echo $y["id"];?>' title='Content from <?PHP echo $y["name"];?>'><?PHP echo $y["name"];?></li>
													<div class='popout-content' id='pcco<?PHP echo $y["id"];?>'>
													
													</div>
												
												<?PHP
												
												
											}
											
										}
										
										

					}
					?>
					
		</div>
		
		
	
	</section>
	<script src="assets/js/jpopup.js" type="text/javascript" charset="utf-8"></script>
	
	<script type="text/javascript">
	
		$('.popout-selector-back').click(function () {
		
			$(".popout-content").slideOut(150);
			$(".popout-selector-back").slideOut(150);

  	    });


	  	$('.popout-category').click(function () {
	        var cid = $(this).attr("name");
	
	     	var community=cid.replace("co", "");
			$.ajax({ type: 'POST', url: "a/popout-community.php", data: "id="+community, context: document.body, success: function(data){
		    	$(".popout-content").fadeOut(150);
				$(".popout-selector-back").fadeOut(150);

				//alert("#pc"+cid);
				$("#pc"+cid).html(data);

				$("#pc"+cid).delay(500).fadeIn(150);
				$("#pb"+cid).delay(500).fadeIn(150);
		
		      }});
	    });
	
	
	
			$(document).ready(function(){
				$("#pcco<?PHP echo $content['category'];?>").show();
				var community=<?PHP echo $content['category'];?>;
				$.ajax({ type: 'POST', url: "a/popout-community.php", data: "id="+community, context: document.body, success: function(data){
			  
					$("#pcco<?PHP echo $content['category'];?>").html(data);
					$("#pcco<?PHP echo $content['category'];?>").fadeIn(150);
			

			      }});
			});
	
	// iniztialize player
	
	
	   var flashvars = {
			  'absolutePath': '<?PHP echo $conf->absolute_path;?>',
			  'user_email': '<?PHP echo $_SESSION["user_email"];?>'
	   };

	   var params = {
	      'allowfullscreen':   'true',
	      'allowscriptaccess': 'always',
	      'bgcolor': '#3A3A3C'
	   };

	   var attributes = {
	      'id': 'mediaplayer',
	      'name': 'mediaplayer'
	   };

	   swfobject.embedSWF( '<?PHP echo $conf->absolute_path;?>assets/player<?PHP echo $content["flashplayer"];?>/player.swf?<?PHP echo randomchar();?>', 'player', '620', '400', '10.1', 'false', flashvars, params, attributes);
	
	
	</script>
	<section id='popout-player'>
		<div id='player'>
			
   	
		Javascript and Flash is Required to View this Video.
	
		
		</div>
		
	
	</section>
	<div id='popout-discovery'>

			<div id='popout-ads'>
					<?PHP
					if($conf->advertise)
					{
						include 'assets/ads/adsense-medrect.php';
					}
					?>
			</div>
			
			
			 <div id='popout-fb-live'>
				<?PHP 
				//fix this
					if($content["category"]==18)
					{
						$cid=24;
					}
					else
					{
						$cid=$content["category"];
					}
				
				
				?>
				
				<?PHP
				
				if($conf->facebook)
				{
					?>
						<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=130109130382690&amp;xfbml=1"></script><fb:live-stream event_app_id="130109130382690" width="300" height="300" xid='content-<?PHP echo $cid;?>;' via_url="http://pinoytuner.com" always_post_to_friends="true"></fb:live-stream>
					
					<?PHP
				}
				?>
			
				
				
				
	                         </div>


	</div>
	

</section></body>